package cn.huiyunche.base.service.enums;

/**
 * 费用类型
 *
 * @author lm
 */
public enum AccPaytypeEnum {

    ORDER(10, "订单"),
    WITHDRAWAL(20, "提现"),
    REGISTER(30, "用户注册"),
    BIllSUBFEE(40, "账单抵扣"), // 商户积分抵扣账单金额
    REWARD(50, "奖"), // 奖
    PUNISH(60, "罚"), // 罚
    ;

    private final int value;
    private final String text;

    AccPaytypeEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static AccPaytypeEnum getByValue(int value) {
        for (AccPaytypeEnum temp : AccPaytypeEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
